use super::Token;

/// 字符报错
#[inline]
pub fn invalid_char(c: char, line_num: i32) {
    panic!("Invalid char: {{{}}}, in line: {}\n", c, line_num);
}
/// token报错
#[inline]
pub fn invalid_token(token: &Token) {
    panic!(
        "Invalid token: {}, in line: {}\n",
        token.token_str(), token.line_no()
    );
}
/// 下标越界
pub const INDEX_OUT_OF_BOUNDS: &'static str = "index out of bounds";
